package com.khshop.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.khshop.pojo.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.khshop.vo.ServiceResult;

/**
 * <p>
 * 商品 服务类
 * </p>
 *
 * @author zhaoyang
 * @since 2020-10-14
 */
public interface ProductService extends IService<Product> {

    public ServiceResult<Product> addProduct(Product product);
    public ServiceResult<Product> addProductStock(Long id,int num);
    public ServiceResult<Product> updateProduct(Product product);
    public ServiceResult<Product> delProduct(Long id);
    public ServiceResult<IPage<Product>> searchProduct(QueryWrapper<Product> queryWrapper, Integer page, Integer limit);
    public ServiceResult<Product> onsaleProduct(Long []id,boolean status);
    public ServiceResult<Product> productSort();

}
